function PlotElem(option,data,varargin)
GetCommonData;

switch option
    case 'type'
        type=Elem.type;
        ID=data;
        loc=any(type==ID,2);
        gElem=g(loc,:);
        xElem=x(gElem)';
        yElem=y(gElem)';
    case 'index'
        idx=data;
        gElem=g(idx,:);
        xElem=x(gElem)';
        yElem=y(gElem)';
    case 'data'
        nd=ndims(data);
        switch nd
            case 2
                xElem=data(:,1);
                yElem=data(:,2);
            case 3
                xElem=data(:,:,1);
                yElem=data(:,:,2);
        end
end
fill(xElem,yElem,varargin{:})
